package com.example.xianji.activity;

import android.os.Bundle;
import android.os.Build.VERSION;
import android.os.Build.VERSION_CODES;
import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.example.xianji.R;

public class Main_OtherActivity extends Activity implements OnClickListener {
    private RelativeLayout other_back;
    private RelativeLayout relative_layout_my_collection;
    private TextView textView_my_collection;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        if (VERSION.SDK_INT >= VERSION_CODES.KITKAT) {
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
        }
        setContentView(R.layout.activity_main__other);
        //MyApplication.getInstance().addActivity(this);
        other_back = (RelativeLayout) findViewById(R.id.other_relative_back);
        relative_layout_my_collection = (RelativeLayout) findViewById(R.id.relative_layout_my_collection);
        textView_my_collection = (TextView) findViewById(R.id.textView_my_collection);

        other_back.setOnClickListener(this);
        relative_layout_my_collection.setOnClickListener(this);
        textView_my_collection.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        if (v.getId() == R.id.other_relative_back) {

            this.finish();
        } else if (v.getId() == R.id.relative_layout_my_collection) {
            textView_my_collection.setTextColor(getResources().getColor(R.color.blue22));
            relative_layout_my_collection.setBackgroundColor(getResources().getColor(R.color.grayF2));
            startActivity(new Intent(Main_OtherActivity.this, Main_My_CollectionActivity.class));


        }
    }


}
